<?php
defined('IN_ADMIN') or exit('No permission resources.'); 
$show_validator = $show_scroll = $show_dialog = 1; 
include $this->admin_tpl('header', 'admin');
 ?>
<form method="post" action="?m=reg_child&c=goods&a=add" id="myform">
<div class="pad-10">
<div class="col-tab">
<div id="div_setting_1" class="contentList pad-10">
	<table width="100%" class="table_form ">
		<tbody>
		<tr>
			<th width="200"><?php echo L('goods_name')?>：</th>
			<td><input name="goods[name]" id="goods_name" class="input-text" type="text" size="40"></td>
		</tr>
		<tr>
			<th width="200"><?php echo L('goods_original_price')?>：</th>
			<td><input name="goods[original_price]" id="original_price" class="input-text" type="text" size="40" placeholder='商品原价为纯数字，支持小数点后两位...'></td>
		</tr>
		<tr>
			<th width="200"><?php echo L('goods_preferential_price')?>：</th>
			<td><input name="goods[preferential_price]" id="preferential_price" class="input-text" type="text" size="40" placeholder='商品优惠价为纯数字，支持小数点后两位...'></td>
		</tr>
		<tr>
			<th width="200"><?php echo L('goods_num')?>：</th>
			<td><input name="goods[num]" class="input-text" type="text" size="40" placeholder='数量为纯数字，请输入正整数...'></td>
		</tr>
		<tr>
			<th width="200"><?php echo L('ratio')?>：</th>
			<td><input name="goods[ratio]" class="input-text" type="text" size="40" placeholder='积分兑换比例为纯数字，请输入正整数...'><font color='red'>例如:100积分兑换1元</font></td>
		</tr>
		<tr>
			<th width="200"><?php echo L('goods_image')?>：</th>
			<td><?php echo form::images('goods[image]','goods_image','','reg_child','',40)?></td>
		</tr>
		<tr>
			<th><?php echo L('goods_desc')?>：</th>
			<td><textarea name="goods[description]" id="description"></textarea>
							<?php echo form::editor('description','full','','','',1,1)?></td>
		</tr>
   		</tbody>
   </table>
</div>
<!-- <div id="div_setting_2" class="contentList pad-10 hidden">
	<table width="100%" class="table_form ">
		<tr>
			<th width="200"><?php echo L('image_horizontal_big')?>：</th>
			<td><?php echo form::images('goods[image_horizontal_big]', 'image_horizontal_big', '', 'goods', '', 40)?></td>
		</tr>
		<tr>
			<th><?php echo L('image_vertical_big')?>：</th>
			<td><?php echo form::images('goods[image_vertical_big]', 'image_vertical_big', '', 'goods', '', 40)?></td>
		</tr>
		<tr>
			<th><?php echo L('image_horizontal_small')?>：</th>
			<td><?php echo form::images('goods[image_horizontal_small]', 'image_horizontal_small', '', 'goods', '', 40)?></td>
		</tr>
		<tr>
			<th><?php echo L('image_vertical_small')?>：</th>
			<td><?php echo form::images('goods[image_vertical_small]', 'image_vertical_small', '', 'goods', '', 40)?></td>
		</tr>
		<tr>
			<th><?php echo L('image_square')?>：</th>
			<td><?php echo form::images('goods[image_square]', 'image_square', '', 'goods', '', 40)?></td>
		</tr>
   </table>
   </div> -->
	 <div class="bk15"></div>
    <input name="dosubmit" type="submit" value="<?php echo L('submit')?>" class="button">
</div></div>
</form>
</body>
</html>
<script type="text/javascript">

$(document).ready(function(){
	$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'220',height:'70'}, function(){this.close();$(obj).focus();})}});
	$('#goods_name').formValidator({autotip:true,onshow:"<?php echo L('please_input_goods_name')?>",onfocus:"<?php echo L('please_input_goods_name')?>",oncorrect:"<?php echo L('true')?>"}).inputValidator({min:1,onerror:"<?php echo L('please_input_goods_name')?>"})
	
});

</script>